]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Propagate version to Javascript files
authorGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 11 Jan 2011 21:34:09 +0000 (22:34 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Wed, 12 Jan 2011 19:32:30 +0000 (20:32 +0100)
Add an entry in config.js.in for PACKAGE_VERSION and GJS_VERSION,
to be used by the notification daemon and in the future by the
extension system.

https://bugzilla.gnome.org/show_bug.cgi?id=639255

configure.ac
js/misc/config.js.in
js/ui/notificationDaemon.js

index 08655072eb9e0aff1f5fb7ddb5fee2a236f40491..a1d1bcab31bca804439d64b6a5cfc27e8276d213 100644 (file)
@@ -6,6 +6,9 @@ AC_CONFIG_SRCDIR([src/shell-global.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([config])
 
+AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"])
+AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"])
+
 AM_INIT_AUTOMAKE([1.10 dist-bzip2 no-dist-gzip foreign])
 AM_MAINTAINER_MODE
 
@@ -78,6 +81,10 @@ PKG_CHECK_MODULES(MUTTER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION
                                  gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
                                 libcanberra)
 
+GJS_VERSION=`$PKG_CONFIG --modversion gjs-internals-1.0`
+AC_DEFINE_UNQUOTED([GJS_VERSION], ["$GJS_VERSION"], [The version of GJS we're linking to])
+AC_SUBST([GJS_VERSION], ["$GJS_VERSION"])
+
 saved_CFLAGS=$CFLAGS
 saved_LIBS=$LIBS
 CFLAGS=$MUTTER_PLUGIN_CFLAGS
index db8c6da5ed81a7f1ac73b934d3399c06e3264e66..25a0e728723ccf52c90988a5461af9928cbbc503 100644 (file)
@@ -1,3 +1,10 @@
 /* mode: js2; indent-tabs-mode: nil; tab-size: 4 */
+/* The name of this package (not localized) */
+const PACKAGE_NAME = '@PACKAGE_NAME@';
+/* The version of this package */
+const PACKAGE_VERSION = '@PACKAGE_VERSION@';
+/* The version of GJS we're linking to */
+const GJS_VERSION = '@GJS_VERSION@';
+/* 1 if gnome-bluetooth is available, 0 otherwise */
 const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
 
index cbf34cf35f355fde0e29576b8410c7feabcf73d3..b87b3a41d6e33261d0a2d51fd86f45577954ef67 100644 (file)
@@ -9,6 +9,7 @@ const St = imports.gi.St;
 const Gettext = imports.gettext.domain('gnome-shell');
 const _ = Gettext.gettext;
 
+const Config = imports.misc.config;
 const Main = imports.ui.main;
 const MessageTray = imports.ui.messageTray;
 const Params = imports.misc.params;
@@ -390,10 +391,10 @@ NotificationDaemon.prototype = {
 
     GetServerInformation: function() {
         return [
-            'GNOME Shell',
+            Config.PACKAGE_NAME,
             'GNOME',
-            '0.1', // FIXME, get this from somewhere
-            '1.0'
+            Config.PACKAGE_VERSION,
+            '1.2'
         ];
     },